<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=desvice-width, initial-scale=1.0">
<script type="text/javascript" charset="UTF-8"
	src="https://wx.gtimg.com/pay_h5/goldplan/js/jgoldplan-1.0.0.js"></script>
<script type="text/javascript"
	src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	<script type="text/javascript"
			src="/themes/js/main.js"></script>
<title>支付完成</title>
<style>
body {
	font-family: PingFang SC, "Helvetica Neue", Arial, sans-serif;
}
.order_box {
	text-align: center;
}
.order_box .bussiness_avt img {
	width: 68px;
	height: 68px;
	border-radius: 100%;
	border: 1px solid #E0E0E0;
}
.b_name {
	font-size: 14px;
	font-weight: 500;
	color: #333333;
	margin-top: 6px;
}
.col_box {
	margin-top: 35px;
}
.col_box .col {
	display: -webkit-box;
	display: -ms-flexbox;
	display: -webkit-flex;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	-webkit-align-items: center;
	align-items: center;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	-webkit-justify-content: space-between;
	justify-content: space-between;
	font-size: 14px;
	color: #333;
	margin-bottom: 14px;
}
.col .ct.price {
	color: #E61515
}
.btns {
	display: -webkit-box;
	display: -ms-flexbox;
	display: -webkit-flex;
	display: flex;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	-webkit-justify-content: space-between;
	justify-content: space-between;
	margin-top: 31px;
}
.btns .btn {
	width: 147px;
	height: 35px;
	line-height: 35px;
	font-size: 14px;
	border-radius: 39px;
	border: 1px solid #CD2314;
	box-sizing: border-box;
	color: #CD2314;
}
.btns .btn.detail {
	background: linear-gradient(270deg, #D51010 0%, #EF4D2D 100%);
	color: #fff;
}
</style>
</head>
<body>
	<div class="order_box">
		<div class="bussiness_avt">
			<img id="b_avt" src="https://h5.csnits.com/park/themes/64.jpeg"
				alt="">
		</div>
		<div class="b_name" id="b_name">中科国智科技服务（上海）有限公司</div>
		<div class="col_box">
			<div class="col">
				<div class="lab">订单编号</div>
				<div id="p_name" class="ct"></div>
			</div>
			<div class="col">
				<div class="lab">支付金额</div>
				<div id="count" class="ct">3</div>
			</div>
		</div>
		<div class="btns">
			<div id="backHome" class="btn home">返回首页</div>
			<div id="toOrder" class="btn detail">查看详情</div>
		</div>
	</div>

</body>
<script type="text/javascript">
	function getUrlParam(name) {
	    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
	    var r = window.location.search.substr(1).match(reg);  //匹配目标参数
	    if (r != null) return unescape(r[2]); return null; //返回参数值
	}
   window.onload = function () {
	   var streetNo = '';
	   var _type = '';
	   var out_trade_no = getUrlParam('out_trade_no');
       var order_no = '';
       var _month = '';
       var cph = '';
       var url1 = host_name+'/park/logs';
       var url2 = host_name+'/park/index';
	   $.ajax({
	    	  url:'/park/data/getServerInfo',
	    	  type:'post',
	    	  data:'outNo='+out_trade_no,
	    	  dataType:'json',
	    	  success:function(res){
	    		  order_no = res.data.split('_')[2]+"_"+res.data.split('_')[3];
	    		  cph =  res.data.split('_')[6];
	    		  _month = res.data.split('_')[5];
	    		  streetNo = res.data.split('_')[4];
	    		  _type = res.data.split('_')[1];
	    		  if(_type!=null&&_type=='GZ'){
	    			  url1 = host_name+'/park/byxq';
	    			  url2 = host_name+'/park/bycp';
	    	      }
	    		  var btnBack = document.getElementById("toOrder");
	    	      btnBack.onclick = function () {
	    	    	  let mchData = { action: 'jumpOut', jumpOutUrl:url1 }
	    	         let postData = JSON.stringify(mchData)
	    	         parent.postMessage(postData, 'https://payapp.weixin.qq.com')
	    	      }
	    	      
	    	      var backHome = document.getElementById("backHome");
	    	      backHome.onclick = function () {
	    	         let mchData = { action: 'jumpOut', jumpOutUrl: url2 }
	    	         let postData = JSON.stringify(mchData)
	    	         parent.postMessage(postData, 'https://payapp.weixin.qq.com')
	    	      }

	    	      let mchData2 ={action:'onIframeReady',displayStyle:'SHOW_CUSTOM_PAGE'};
	    	      let postData2= JSON.stringify(mchData2);
	    	      parent.postMessage(postData2,'https://payapp.weixin.qq.com')
	    	      $.ajax({
	    	    	  url:'/park/data/getOrderByLakala',
	    	    	  type:'post',
	    	    	  data:'out_order_no='+out_trade_no+'&order_no='+order_no+'&streetNo='+streetNo+'&_type='+_type+'&_month='+_month+'&cph='+cph,
	    	    	  dataType:'json',
	    	    	  success:function(res){
	    	    		  $('#p_name').html(out_trade_no);
	    	    		  $('#count').html('￥'+parseFloat(res.data.amount)/100);
	    	    	  }
	    	      })
			}
		})

	}
</script>
</html>